package com.sjx.onelinecord.ui;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.view.Gravity;
import android.widget.Toast;

import com.sjx.onelinecord.R;
import com.sjx.onelinecord.ui.dialog.CustomDialog;

public class DialogAty extends AppCompatActivity {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_dialog_aty);
        initDialog();
    }

    private void initDialog() {
        final CustomDialog dialog = new CustomDialog(DialogAty.this);
        dialog.setMessage("巷子口的北美白杨树").setImageResId(R.mipmap.ic_launcher).setGravity("top")
                .setSingle(false).setOnClickBottomListener(new CustomDialog.OnClickBottomListener() {
            @Override
            public void onPositiveClick() {
                dialog.dismiss();
                Toast.makeText(DialogAty.this, "xxxx", Toast.LENGTH_LONG).show();
            }

            @Override
            public void onNegativeClick() {
                dialog.dismiss();
                Toast.makeText(DialogAty.this, "ssss", Toast.LENGTH_LONG).show();
            }
        });
        dialog.show();
    }
}